﻿using System;
using System.Collections.Generic;
using System.Text;

namespace SharpDiary.Core.Data
{
    /// <summary>
    /// 标识类对应的数据表名称。
    /// </summary>
    [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct)]
    public class TableInfoAttribute : Attribute
    {
        #region Fields & Properties

        private string _tableName = string.Empty;

        public string TableName
        {
            get { return _tableName; }
            set { _tableName = value; }
        }

        #endregion

        #region Constructors

        /// <summary>
        /// 实例化 TableInfoAttribute。
        /// </summary>
        /// <param name="tableName">表名称</param>
        public TableInfoAttribute(string tableName)
        {
            _tableName = tableName;
        }

        #endregion
    }
}
